CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 4/5/2006 1:42:27 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 64 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
gormster
Asp.Net User
Using the DynamicItemTemplate4/5/2006 1:42:27 AM

0/0

Hi everyone,

I'm trying to use an ASP menu in conjunction with AJAX, so I need to be able to us the DynamicItemTempate to get the thing to run some javascript and not move to another page. The problem is, the way I assumed you would do this is by using <%# Container.DataItem.whatever %>, since the Container.DataItem points to the MenuItem in question - however it throws an error, since Text and NavigateUrl are not members of Object. Is there some way I can get the Text or anything else I want into the DynamicItemTemplate? (I assume there is, right? Otherwise it would be totally useless...)

        <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" DataSourceID="xdsSitemap">
            <DataBindings>
                <asp:MenuItemBinding DataMember="section" Text="&nbsp;" ImageUrlField="img" />
                <asp:MenuItemBinding DataMember="page" TextField="name" />
            </DataBindings>
            <DynamicItemTemplate>
                <a href="javascript:goto(<%# Container.DataItem.NavigateUrl%> );"><%# Container.DataItem.Text %></a>
            </DynamicItemTemplate>
        </asp:Menu>
dannychen
Asp.Net User
Re: Using the DynamicItemTemplate4/5/2006 7:35:37 PM

0/0

You should use the new simplified DataBinding syntax instead.

<%# Eval("NavigateUrl") %>

If you insist on the old fashioned databinding you should still be able to do:

<%# DataBinder.Eval(Container.DataItem, "NavigateUrl") %>

--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
gormster
Asp.Net User
Re: Using the DynamicItemTemplate4/6/2006 7:21:10 AM

0/0

Thanks heaps, that really helped!
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0: A Developer's Notebook Authors: Wei Meng Lee, Pages: 326, Published: 2005
Build Your Own ASP.NET 2.0 Web Site Using C# & VB: The Ultimate ASP.NET Begginner's Guide Authors: Cristian Darie, Zak Ruvalcaba, Pages: 689, Published: 2006
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1148, Published: 2006
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007

Web:
Using the DynamicItemTemplate - ASP.NET Forums Using the DynamicItemTemplate. Last post 04-06-2006 3:21 AM by gormster. 2 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
Menu.DynamicItemTemplate Property (System.Web.UI.WebControls) Instead of using the built-in rendering for a dynamic menu, you can define your own look and feel for a dynamic menu item by using the DynamicItemTemplate ...
asp:Menu, DynamicItemTemplate and formating text postback . I am using the DynamicItemTemplate. The simple form for the template is <%# Eval("Text") %>
.NET ASP.NET webcontrols asp:Menu, DynamicItemTemplate and ... I am using the DynamicItemTemplate. The simple form for the template is and it look like this for example Text dkd kdk ToolTip alkd alkdj fl ...
Problem with DynamicItemTemplate in CSS Friendly Menu - ASP.NET Forums I already have all of my CSS for using the Control Adapters, ... this problem when you set things up using DynamicItemTemplate like you did. ...
MenuItemTemplateContainer Class (System.Web.UI.WebControls) You can define a custom template for the dynamic and static menu items of a Menu control by using the DynamicItemTemplate and StaticItemTemplate properties, ...
vb6 menu editor equivalent (using asp.net 2.0, vb.net 2005) ... control to the DynamicItemTemplate the check boxes appear in both menus next to every menu item. ...
TreeView SelectedNodeChanged Event - .NET ASP I am using a TreeView to perform navigation and have a few nodes that need ... < DynamicItemTemplate> asp:Menu Images Disappearing - ASP.NET I have been using the asp:Menu control for a while now but have only ... Height= "39px" /> KBAlertz.com: (306227) - Use this step-by-step guide to add a ... NET Web Forms, you can add controls to the DataGrid by using the TemplateColumn. .. ... HeaderText = "CheckBox Column" ' Call DynamicItemTemplate to add the ...




Search This Site:










where has the dll gone in vs2005?

traditional authentication without database

what is ssl

looping through treeview using javascript

information in web.config file is accesible at file level.

using user data across pages and sessions

parser error - line 1: <?xml version="1.0" encoding="utf-8" ?>

inamingcontainer and client side script question

ttt/dnn core forum emoticons smiley and gallery integration. help

new menu control and highlighting which area of the site you are in.

want to load .aspx page within tabs from an .ascx module on one of my tabs

logout

australian dnn hosts

registration page.

3.1 web.config - <trust level="full"> required, help...

login page works in .net app server, not real server

user login module

changepassword control

where is dnn2.0.3?

blogging module? or event by date..

using masterpage and subfolders

mystery of the disappearing dll's

expand treenode .. pls help!

dnn 3.08, error adding new page

ajax control toolkit problem

how to: combine sitemap with dynamic flash menu

createuserwizard control

different set of masterpages for different themes

c# treeview issues

buttons in createuserwizard

 
All Times Are GMT